package db

import (
	"log"
	"git.oschina.net/a2go/sqlGo"
	"admin/config"
)


//初始化数据库连接
func InitDB(){
	hostAddress,err := config.ReadMySQLConf("/config.ini")
	log.Println("读取的数据库文件地址：", hostAddress)
	if err != nil {
		panic(err.Error())
	}
	err = sqlGo.ConnectDb(hostAddress, "mysql")
	if err != nil {
		panic(err.Error())
	}

}